package io;

import java.io.*;

public class FOSDemo {
    public static void main(String[] args) throws IOException {
        File file =new File("fos.bat");
        FileOutputStream fos=new FileOutputStream(file,true);

//        FileOutputStream fos = new FileOutputStream("fos.dat");
        fos.write(1);//代表向fos.dat写一个字节
        fos.write(2);//向fos.dat中又写入一个字节
        System.out.println("写出完毕");

        fos.close();




    }
}
